///////////////////////////////////////////////////////////////////////////////
// File:        TcpConnectionInputStream.hpp
// Author:      671643387@qq.com
// Description:
///////////////////////////////////////////////////////////////////////////////

#ifndef MONKEY_COMMON_TCPCONNECTIONINPUTSTREAM_HPP_
#define MONKEY_COMMON_TCPCONNECTIONINPUTSTREAM_HPP_

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif

#include "common/TcpConnectionStream.hpp"

namespace monkey
{
    namespace common
    {
        class TcpConnectionInputStream : public TcpConnectionStream
        {
        public:
            typedef TcpConnectionInputStream Self;
        public:
            TcpConnectionInputStream(TcpConnection& conn);
            virtual ~TcpConnectionInputStream();

        public:
            int Fill(void);

            unsigned int Read(char* buf, unsigned int length)
            {
                return TcpConnectionStream::Read(buf, length);
            }

            unsigned int Peek(char* buf, unsigned int length)
            {
                return TcpConnectionStream::Peek(buf, length);
            }

            unsigned int Skip(unsigned int length)
            {
                return TcpConnectionStream::Skip(length);
            }
        };
    }
}

#endif /* MONKEY_COMMON_TCPCONNECTIONINPUTSTREAM_HPP_ */
